package com.servlet;

import com.alibaba.fastjson.JSONObject;
import com.server.GameServer;
import com.server.MatchServer;

public class Test {
    public static void main(String[] args) {
        MatchServer.addUser("user1");
        MatchServer.addUser("user2");
        String state1=MatchServer.getMatch("user1");
        String state2=MatchServer.getMatch("user2");
        JSONObject m=new JSONObject();
        m.put("msg","nihao");
        GameServer.sendMsg("user1","0",m);
        JSONObject msg=GameServer.getMsg("user2","0");
        GameServer.sendMsg("user2","0",m);
        msg=GameServer.getMsg("user1","0");
        System.out.println("state1 "+state1+" state2 "+state2+" msg"+msg.toString());
    }
}
